Simulate network control
There is a tc
command on Ubunut to manipulate traffic control settings, for example to introduce artificial packet
dropping.
Add a packet delay of 100ms ± 10ms with the current delay depending 25% on the last delay:
tc qdisc change dev eth0 root netem delay 100ms 10ms 25%
You can even configure more convoluted settings:
sudo tc qdisc change dev lo root netem delay 50ms 200ms loss 10% 25% reorder 25% 50%
- Packet delay of 50ms ± 200msd
- Packet loss of 10% to 25%
- Reorder packages between 25%-50% of the time
This page gives more thorough examples.